package com.qhnu.zxjx.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @description: 时间工具类
 * @author: panpei
 * @date: 2019/8/2 13:56
 * @version: 1.0
 **/
public class TimeUtil {
    /**
     * 日期转字符串
     * @param date
     * @param format
     * @return
     */
    public static String date2String(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}
